Completed
Push — master ( 727b9d...4893ea )
by Askupa
02:03
created

$(ꞌ.amarkal-settings-buttonꞌ).click   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 19
rs 9.4285
c 1
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A ick 0 5 1
1
$('.amarkal-settings-button').on('click',function(e){
2
    e.preventDefault();
3
    var $button = $(this);
4
    console.log(getFormData());
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
5
    if(!$button.data('disabled'))
6
    {
7
        $('.amarkal-settings-button').data('disabled',true);
8
        $button.addClass('processing');
9
        
10
        $.post(ajaxurl, {
0 ignored issues
show
Bug introduced by
The variable ajaxurl seems to be never declared. If this is a global, consider adding a /** global: ajaxurl */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
11
            action: 'amarkal_settings_'+$button.val(),
12
            data: getFormData()
13
        }, function(res){
14
            console.log(res);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
15
            $button.removeClass('processing');
16
            $('.amarkal-settings-button').data('disabled',false);
17
        });
18
    }
19
});